package com.zgs.mall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zgs.common.utils.PageUtils;
import com.zgs.mall.product.entity.AttrEntity;
import com.zgs.mall.product.vo.AttrGroupRelationVo;
import com.zgs.mall.product.vo.AttrRespVo;
import com.zgs.mall.product.vo.AttrVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author zgs
 * @email 
 * @date 2020-07-09 08:49:51
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    PageUtils queryPage(Map<String, Object> params, Long catId, String attrType);

    void saveAttr(AttrVo attr);

    AttrRespVo getAttrInfo(Long attrId);


    void updateAttr(AttrVo attr);

    /**
     * g根据属性分组id 查询所有关联的 属性关联的数据
     * @param attrgroupId
     * @return
     */
    List<AttrEntity> getRelation(Long attrgroupId);

    void deleteRelationDelete(AttrGroupRelationVo[] attrGroupRelationVos);

    PageUtils getAttrNoRelation(Long attrgroupId, Map<String, Object> params);


    public List<Long> selectSearchAttrIds(List<Long> attrIds);
}

